package cn.tedu.tmall.front.content.dao.repository.impl;

import cn.tedu.tmall.front.content.dao.mapper.CategoryMapper;
import cn.tedu.tmall.front.content.dao.repository.ICategoryRepository;
import cn.tedu.tmall.front.content.pojo.po.CategoryPO;
import cn.tedu.tmall.front.content.pojo.vo.CategoryItemVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class CategoryRepository implements ICategoryRepository {
    @Autowired
    private CategoryMapper categoryMapper;
    @Override
    public List<CategoryPO> list() {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("is_display",1);
        return categoryMapper.selectList(queryWrapper);
    }
}
